#include <stdio.h>
#include <fcntl.h>
#define N 20
int main()
{
    mkfifo("/tmp/mypipe", 0666);
    int fd = open("/tmp/mypipe", O_RDONLY);
    char buf[N];
    read(fd, buf, N);
    printf("Received: %s\n", buf);
    close(fd);
    return 0;
}